//Town script for town 17: Empire HQ level 2

begintownscript;

variables;

int day6;

body;

beginstate INIT_STATE;
	set_crime_tolerance(3);
	
	set_name(6,"Empire HQ chief");
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;

	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(6,"Stupid Thralni");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(6,"Mumble");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(7,"Hmmm");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(7,"What to do...");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(8,"Shall I have chicken?");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(8,"Or pork...");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(9,"Checkmate!");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(9,"Again I beat you!");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(10,"Damn");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(10,"So close...");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(10,"Stupid game");
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(15,"Slurp");

	if (get_flag(17,5) == 1) {
			day6 = get_flag(250,7);
	
			if (what_day_of_scenario() >= day6 + 3) {
					set_flag(17,5,2);
					end();
					}
				erase_char(6);
				}

break;

beginstate 10;
	move_to_new_town(16,12,27);
break;

beginstate 11;
if (get_flag(17,0) == 1)
		end();
	message_dialog("The upper part, where all important commanders and such live, is much more beautiful than the lower part. Not only is there a wooden floor, but the walls, made of marble, are nicer too.","");
	set_flag(17,0,1);
break;

beginstate 12;
if (get_flag(17,3) == 1)
		end();
	message_dialog("You enter a room in chaos. Everywhere is covered in paper. A man, with his hands in his hair, is sitting at a desk. It seems something important has gone very wrong.","");
	set_flag(17,3,1);
break;

beginstate 13;
if (get_flag(17,4) == 1)
		end();
	message_dialog("This is the room of the head of this fort. He is a man, dressed in a long sort of dress. He sits as a desk, writing all kinds of things. He must be very important and powerful.","");
	set_flag(17,4,1);
break;